home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Precision Software Appli…tions Silver Collection 1
/
Precision Software Applications Silver Collection Volume One (PSM) (1993).iso
/
tutor
/
pcl57.arj
/
PART1.EXE
/
DOS2.TUT
< prev
next >
Wrap
Text File
|
1992-12-30
|
50KB
|
1,041 lines
----------------------------------------------------------------
ADVANCED DOS COMMANDS
----------------------------------------------------------------
This tutorial covers advanced DOS commands, updates for DOS
version 5.0, keyboard shortcuts, function key assignments and a
special functional index of DOS commands which is located at the
end of the tutorial.
Life gets more interesting the longer you stay in the game. The
more you want to accomplish with a computer, the more you need
advanced DOS commands. But first, let's take a side trip to the
keyboard and study some powerful DOS shortcuts.
----------------------------------------------------------------
FUNCTION KEY USE
----------------------------------------------------------------
The keyboard function keys labelled F1 through F10 access a
special buffer storage area of DOS. Additional key combinations
offer other shortcuts. Some keyboards have twelve function keys
while others have the function keys arranged along the top of
the keyboard rather than stacked along the side.
The best way to understand how the function keys work is to
pause and explain the concept of a keyboard buffer which is
little more than a temporary storage area in the computer's
memory. A buffer is necessary because the activities of input
and output (using the keyboard or printer) are much slower than
those activities which interact with the speedy RAM memory chips
and CPU.
Data from the keyboard is placed into a memory buffer area until
you signal the PC that you are ready to move on to the next
task. Usually this signal is the carriage return or enter key. A
buffer storage area can vary in size. For the DOS command line
buffer, up to 127 characters can be contained. When data is
entered into the keyboard buffer is stays there until flushed
out. DOS allows some limited repeating and editing of data
stored in the buffer (data you previously typed at the keyboard)
by use of the function keys.
The FUNCTION Keyboard:
The following discussion applies to the function keys WHEN
YOU ARE USING DOS! When you use an application such as your word
processor or database program the function keys will probably
have different uses!
The function keys assume different roles for different programs.
F1 through F5 have special meaning within DOS. They help in
reissuing/editing the last DOS command typed.
F1 Repeats one character per keystroke of the previous DOS command
typed.
F2 Repeats characters stored in the buffer up to the character
you typed after pressing F2.
F3 Repeats the entire LAST command. USEFUL! Repeat last command
and edit it over again with other function keys or the backspace
key.
F4 Deletes all characters in the buffer up to the character you
typed after F4. The buffer is not displayed. To see the buffer
on screen tap F3.
F5 Stores the current line for re-editing. F5 is used with the
other four keys so you can repair long DOS commands which
weren't typed in properly. When you press F5 the current line
will be marked and the cursor will move down one line WITHOUT a
new prompt. Then use the other function keys to finish editing.
The main Keyboard
Delete key deletes character on or to the right of the cursor
Backspace key removes last character typed - to the left of
cursor
Insert key puts keyboard into insert mode
Escape key voids current input and exits or escapes to previous
settings
PageUp key in many applications moves you up one screen of text
PageDown key in many applications moves you down one screen of
text
Left and right arrow keys move cursor left and right without
deleting
Numlock key toggles (goes back and forth) between numbers on the
numeric keypad and cursor control (functions such as page down,
move cursor right, etc)
Pressing two or more keys at the same time produces further
results. You may hold down the Control (Ctrl) key and then
press another key for a required result. Here are some two key
combinations. Hold down the first key, then press the second:
Shift-PrtSc prints one screen of data on your printer.
Control-C or Control Break Aborts current DOS command. USEFUL!
Control-H or backspace removes last character typed
Control-P or Control-PrtSc sends output to printer until turned
off by typing same key combination (Control P) a second time.
Whatever appears on screen will be sent to printer until turned
off with control P a second time. This is a little used, often
forgetten and HIGHLY useful key combination!
Control Numlock or Control S pauses screen output. Press any key
to continue
Control-Alt-Delete keys together shuts down computer and WIPES
OUT all computer data! This is also called a "warm boot"
as compared to a cold boot (completely turning off computer,
then turning back on again.) Either of these methods means that
ALL DATA AND PROGRAMS LOST from RAM memory but whatever data
stored on disk(s) remains.
Other keys have special meanings and can be confused with their
look-alike twins: the slash (/) and Backslash (\) are different
but easily confused as are the apostrophe (') and grave accent (`),
and also the capital O and Zero (0.)
----------------------------------------------------------------
ADVANCED DOS COMMANDS AND METHODS
----------------------------------------------------------------
Now on to some of the more advanced DOS commands, files and
methods which we continue from the previous DOS tutorial:
-- AUTOEXEC.BAT -- is not a DOS command but a small text file
which gives the user an automatic way to specify a precise
series of DOS commands whenever the computer is started each
day. Within AUTOEXEC.BAT you can specify system variables such
as the PATH and PROMPT commands, load or start a menu system
with a variety of program choices, load memory resident "TSR"
programs such as a calculator or notepad, run other batch files
or start one specific program such as your word processor every
time the computer is turned on. You can create or modify an
AUTOEXEC.BAT file with any word processor which saves text in
ASCII (plain text) format. Additional comments and explanations
about the AUTOEXEC.BAT file are provided in the batch file
tutorial elsewhere within PC-Learn. Following is a listing of
the contents within a sample AUTOEXEC.BAT file. Note that it is
simply a series of DOS commands which will be given every time
the computer is first turned on:
echo off
date
time
path \dos;\wp;\util;\doc;\bat
prompt $P$G
verify on
mode bw80,r
type menu
-- CONFIG.SYS -- is not a DOS command, but a small text file
which tells DOS the system setup information or "custom
configuration" of your computer. Whenever additional hardware is
added such as a tape drive, mouse, ram drive or other device,
you will usually add a DEVICE command to the CONFIG.SYS file so
that DOS can recognize the new hardware or software device.
Performance can also be increased by adding other parameters to
the CONFIG.SYS file such as the FILES and BUFFERS commands. On
startup, CONFIG.SYS helps DOS determine the configuration of
hardware, RAM memory, keyboard, ramdisk, hard drives and other
"customizations" to your system and is usually stored in the
root or main directory of your hard drive. The CONFIG.SYS file
can be prepared or altered with your word processor operating in
ASCII mode (plain text). You could also use the COPY CON command
or any text editor such as Edlin to prepare a CONFIG.SYS file.
Following is a listing of the contents within a sample CONFIG.SYS
file:
device=ansi.sys
device=vdisk.sys
buffers=20
files=20
-- MODE -- (External) is a command to setup the printer,
display and communications outputs of your computer. Use mode
when you have several printers or two or more monitors such as
both color and monochrome.
Example: A>mode CO80 (set display mode to color,80
columns wide)
Example: B>mode lpt1=com1 (set printer to com port number
1)
Example: A>mode com1:10,n,8,1,p (set modem transmission
settings)
Example B>mode bw80,r (set monitor to b&w text, 80
columns wide)
-- MORE -- (External) causes the display to pause when reading a
long file or directory. More is always combined with other DOS
commands. See below for an example using the MORE command.
-- REDIRECTION AND PIPING -- Are not DOS commands but powerful
methods for sending information to or through other DOS
utilities.
Some commands, for example DIR, can use MORE, SORT and other DOS
"filters" with a special vertical bar | in a method called
"piping". Piping is best explained as "filtering" a DOS action
through yet another DOS program or command.
Example A>dir|more (DIR listing is "piped" through
MORE to pause after each
screenful of information)
Try it with a long listing!
Example: B>type letter.txt|more (the file letter.txt is "piped"
through MORE)
-- < and > -- are input/output symbols. They help DOS send and
receive signals properly. You can redirect the output from or
towards a particular device. For example if the output of a file
normally goes to the screen you could redirect it with the >
symbol to the printer. Or you could redirect the input for a DOS
command from a file, rather than the keyboard so you would not
have to answer a series of questions - the file would provide
the keystrokes.
Example: A>sort<letter.txt>letter.new (sort letter.txt and
output to a new file
called letter.new)
Example: B>dir>prn (meaning produce a directory listing, but
send the output to the printer, rather than the screen)
Example: format b:<special.txt (format a floppy and accept input
keystrokes from the file special.txt rather than input from the
keyboard so you don't have to answer yes/no or pause)
These piping and redirection methods are powerful and subtle.
-- SORT -- (External) sorts data lists in alphabetical or
reverse order. It is frequently used with redirection and piping
methods to sort directories, lists of text or to output its
actions into a new file or directly to the printer.
Example: A>dir|sort Example: sort<letter.doc>new.doc
-- GRAPHICS -- (External) allows you to print the contents of a
graphics display (e.g., a lotus graph on the screen) while using
the SHIFT-PRTSC key combination mentioned earlier. Graphics mode
software uses medium resolution CGA color displays or other
graphics displays which will not print using the standard SHIFT-
PRTSC key until the DOS graphics system has been loaded.
Graphics is a memory resident program which uses some RAM
memory. If a screen display will not print on your printer by
tapping SHIFT-PRTSC, trying running graphics first then retry
SHIFT-PRTSC.
Example: A>graphics
-- FIND -- (External) searches for words and phrases in a file.
You cannot use wild cards (? and *). You must use quotes
surrounding the phrase or word which is sought.
Example: A>find "chocolate candy bars" letter.txt bones.wks
(meaning: search for "chocolate candy bars" within the two
files letter.txt and bones.wks then report any occurrences)
-- ASSIGN -- (External) tells DOS to send disk requests for one
drive to the other. Effectively renames your a drive the b drive
and vice versa. Allows you to access only certain drives for
security reasons (remote modem use, for example). By itself,
assign simply restores the normal drive configurations and
names. DISKCOPY and FORMAT commands ignore assign! Use of assign
command is rare.
Example: B>assign c=a
-- PATH -- (Internal) tells DOS where to search for executable
files in the subdirectories you specify. Allows simultaneous
searching of many subdirectories at once. Path eliminates the
need to search through many subdirectories manually. Frequently
a PATH command is used in your autoexec.bat file when starting
the computer. A path command is highly recommended for use with
all hard drives and, as stated, is embedded within the
AUTOEXEC.BAT file as a permanent command.
Example: C>path \letters;\finance;\utils
-- PROMPT -- (Internal) allows change of the DOS prompt - for
example, the dull A> on screen. $P shows the active directory.
$G shows the > symbol. This can be set in the main autoexec.bat
file to initialize the prompt every time you start your
computer. With the proper commands you can dramatically change
your prompt to even display words, pictures or phrases rather
than a typical C>
See batch file tutorial covered later.
Example: A>prompt $P$G. (result is: a:\> )
-- TREE -- (External) shows the structure of the subdirectories
on your disk. You can check the arrangement of the root (main)
and all subdirectories. Tree/f shows all file names.
Example: B>tree/f
-- ATTRIB -- (External) allows a file to be set as "read only"
(non-erasable). Attrib +r marks for read only. Attrib -r removes
this. Protects files from modification or removal. Attrib alone
displays file attributes. A small r appears to the left of a
files directory listing if that file is read only (protected).
Only available in DOS 3.0 and later.
Example: A>attrib +r letters.doc
-- BACKUP & RESTORE -- (External) used to making spare copies
(backups) of hard disk data. Copies groups of files to floppies.
Restore reverses the process and puts the files from floppies to
hard disk. Backup/m copies only files modified since the last
backup. Backup/s copies all subdirectories and their files.
Backup/d copies files modified after the date you specify.
Backup/a adds files to a disk that already contains other files.
Files copied to floppies with backup can't be used (they are
"encoded") until they are restored ("unencoded"). Restore/s puts
back all subdirectory files.
Example: A>backup c:\*.* a:/s
Example: C>restore a:\*.* c:/s
-- EDLIN -- (External) is a small word processor/text editor
which prepares text files. DOS version 5.0 uses an upgraded
text editor called EDIT which is easier to use the Edlin.
Edlin's output is ASCII (plain text). Edlin is rudimentary and
provides editing line by line. Other word processors and text
editors can output ASCII files more quickly and easily, but
Edlin is good for short jobs such as preparing batch files. The
COPY CON command (discussed earlier) will do the job also. The
entire list of Edlin commands is detailed in your DOS manual.
Example: A>edlin go.bat (starts Edlin and loads the file go.bat)
-- RAMDRIVE.SYS -- (used in MS-DOS, see below) (External)
-- VDISK.SYS -- (used in PC-DOS, see below) (External)
Both of the above files are equivalent "ramdisks" which allow you
to construct an artificial software disk drive in RAM computer
memory. It is very fast and is also known as a virtual disk.
RAMDRIVE.SYS or VDISK.SYS is usually placed in the CONFIG.SYS
file via the DEVICE command. RAMDRIVE.SYS or VDISK.SYS is
available in DOS 3.0 and later. DOS 2.0 users can use
alternative "add in" RAMDISK utilities to produce the same
result. Within the CONFIG.SYS file the following statement might
appear for users of this device:
Example: device=vdisk.sys 128 (sets up a ramdisk of 128,000
bytes in size)
----------------------------------------------------------------
DOS VERSION 5.0
----------------------------------------------------------------
In 1991 Microsoft made DOS more powerful, smarter, sleeker and
vastly more helpful. A variety of major and minor changes to this
classic operating system provide something useful for everyone.
While most computer owners can take advantage of this cornucopia
of new features, a few may not need to upgrade to DOS 5.0. Let's
examine the "new and improved" DOS.
Five major changes were made with DOS version 5.0:
1) An on-line help system was added so that users could access
brief "help screens" for reminders about specific DOS command
syntax and usage. The DOS manual was also substantially improved
and rewritten.
2) By using the extended or "high memory" system of computers
equipped with 80286, 80386 or 80486 CPU processors and additional
RAM memory beyond the conventional 640K, DOS 5.0 can now load
memory resident programs, device drivers and even DOS itself
into extended memory thus leaving more room in conventional
memory for application software - a potent plus for memory
starved software. Up to 622K of memory can be made available to
conventional memory. Microsoft Windows 3.0 applications and
large DOS applications such as spreadsheets and database
programs accelerate with access to this additional memory.
3) A new extended memory manager allows 80386 or 80486 computers
to turn extended memory into LIM (Lotus-Intel-Microsoft)
expanded memory. This provides popular programs such as Lotus
123 and others with the capability to automatically use memory
more effectively and releases additional conventional memory for
data and application software.
4) New commands such as UNDELETE, MIRROR and UNFORMAT were added
to allow for the recovery of accidentally deleted files or
subdirectories. A new DOSKEY command was also added to allow for
convenient recall of previous DOS command keystrokes and also
provides keyboard macro commands.
5) A new graphical interface or shell and full screen "mini-word
processor" text editor was made available. Users can work from
the DOS prompt command line or the new shell and text editor.
The GWBASIC language system, present in most versions of DOS,
was provided with a fresh new interface and editor. The setup or
installation routine for DOS 5.0 cleverly allows users to backup
earlier DOS files - just in case they need to return to a
previous DOS version - and smoothly glides through installation
without the need to completely reformat a hard drive from
scratch, an annoying hallmark of earlier DOS versions.
Beyond these major features, smaller items provide icing on a
useful software cake:
A new SETVER command allows the user to change the apparent DOS
version number so that older, finicky programs which demand a
unique version of DOS run properly.
The DOS directory or DIR command has been updated with
additional switches which let users sort directory listings in a
variety of ways without using the cumbersome SORT command.
Hard drive users also benefit from DOS 5.0 modifications. DOS
5.0 can now create hard drive data partitions of up to 2
gigabytes and can now function with more than two physical
drives at a time. In a series of hard drives, now only one drive
is required to contain a DOS partition for the entire system to
work - a substantial savings in hard disk space.
However, not all computer owners need to upgrade to DOS 5.0.
Owners of older 8088 and 8086 CPU equipped machines - XT class
computers - may find the urge to upgrade to DOS 5.0 to be less
than overwhelming since the advanced memory management features
are unusable on a machine having only 640K of RAM memory.
However the new UNDELETE, UNFORMAT and MIRROR commands, refined
editor, DOSKEY utility, improved Qbasic programming language
interface and on-line help may be reason and convenience enough
to upgrade.
Owners of 80286, 80386 or 80486 CPU equipped machines will
probably wish to upgrade to DOS 5.0 to take advantage of the
additional conventional memory which can be released for
application software as well as the relocation of device drivers
into high memory.
New or modified DOS 5.0 commands include:
-- DOSKEY -- (External)
This DOS utility allows you to recall and edit DOS commands you
previously entered at the DOS prompt. Unlike pressing the F3 key
which recalls only the last command typed, DOSKEY gives you
access to all previous commands typed and allows you to edit
or change them. Keyboard macros or series of keystroke sequences
may also be recorded and edited. DOSKEY is a memory resident TSR
program (terminate and stay resident) which uses about 3K of
conventional memory.
Note that in the syntax examples which follow, you may use
one or several switches following a command if you wish:
(Example) DOSKEY /REINSTALL /HISTORY /OVERSTRIKE
In the above example three parameter switches follow the
command.
Note in DOS syntax examples which follow that the bracket
symbols [ and ] are NOT typed at the DOS prompt, but only serve
to indicate an OPTIONAL parameter or switch.
If you see a | symbol within a syntax example, it means run
EITHER the command prior to the | OR run the command following
the |, but NOT both commands at the same time. Do not confuse
the | symbol given in a syntax example with the "piping symbol"
which is a DOS redirection method sometimes used in DOS
commands. For example, the syntax entry below provides for
EITHER the /INSERT switch OR the /OVERSTRIKE switch.
DOSKEY syntax is:
DOSKEY [/REINSTALL] [/BUFSIZE=size] [/MACROS] [/HISTORY]
[/INSERT|/OVERSTRIKE] [macro=[text]]
Parameters:
/REINSTALL Installs new copy of DOSKEY
/BUFSIZE=size Set buffer size to "size" bytes (default=512)
/MACROS Display current macros
/HISTORY Display command history
/INSERT When editing, default to insert mode
/OVERSTRIKE When editing, default to overstrike mode
macro Name of macro to load or run
text Macro definition
Note that macros override or take precedence over internal
commands such as DIR and CLS. Using this feature you can
define new, personal DOS commands.
(Example) DOSKEY FINDIT=DIR \$1 /S /B
Using the above DOSKEY definition you have created a new command
called FINDIT such that when you type FINDIT *.WKS all
spreadsheet files (which usually end in WKS) will be displayed
and listed on screen. DOSKEY can use advanced DOS characters
such as piping, input and output redirection and replaceable
parameters (e.g., |, >, <, $1)
-- DOSSHELL -- (External)
This is a useful menu program for those preferring a visual
"point and shoot" method of dealing with DOS and managing files,
rather than typing commands at the DOS prompt. It is mouseable
and provides a file viewer and task switcher so you can jump
between software programs and return exactly where you left off
without having to exit each application software program
in progress.
DOSSHELL syntax is:
DOSSHELL [/G[:res[n]]|/T[:res[n]]] /B
Parameters:
/G Start DOSSHELL in graphics mode
res Sets screen resolution with L = low res,
M = medium res, H = High res.
n Resolution number which varies depending
on video card/adapter in use
/T Shell is run in text mode
/B Shell is run in black and white mode
Several functions can ONLY be run from DOSSHELL. For example,
DOSSHELL's rename function can rename a subdirectory which
cannot be done with the RENAME command from the DOS prompt
command line. Likewise, the task switching function can only be
run from DOSSHELL and cannot be activated from the command line
DOS prompt.
-- EDIT -- (External)
This is a full-screen text editor or "mini-word processor" which
offers a practical, intuitive alternative to the previous DOS
EDLIN text processor. EDIT features text search and replace
capabilities, pull-down menus, on-line help, and block moves.
EDIT syntax is:
EDIT [[d:] [path] filename] [/B] [/G] [/H] [/NOHI]
Parameters:
filename Name of the file to be edited
/B Run editor in black and white mode
/G Run editor with fast updates on CGA screens
/H Display maximum number of allowable lines
/NOHI High intensity colors are removed/suppressed
EDIT will not run without the companion file QBASIC.EXE in the
current directory or path. When you start EDIT, internal changes
are made to QBASIC's editor and you are in fact running a
modified version of QBASIC's own editor!
-- EMM386 -- (External)
This utility is a memory manager for the "upper memory area" of
DOS, sometimes called the UMA. It can make your computer's
extended memory simulate expanded memory - if you have extra RAM
memory installed beyond the conventional 640K amount. This is
useful for software programs such as a spreadsheet which can
increase performance when given access to expanded memory. Users
of computers having an 80386 or 80486 CPU can also load programs
and device drivers into this upper memory area. Typically those
using upper or high memory will have 1 Meg, 2 Megs or even 4
Megs of RAM memory available.
EMM386 syntax is:
EMM386 [ON|OFF|AUTO] [W=ON|OFF]
Parameters:
ON Enables the EMM386 device driver
OFF Disables the EMM386 device driver
AUTO Device driver placed in auto mode
W=ON Enables Weitek math coprocessor
W=OFF Disables Weitek math coprocessor
Note that a few software applications will not work with the
EMM386 driver due to virtual-8086 CPU operation of EMM386.
Placing EMM386 in either OFF mode (shuts driver off until
reactivated with the ON command) or AUTO mode (automatically
disables when application begins, then enables EMM386 when
application exits) solves this problem. You cannot switch EMM386
to OFF or AUTO mode when EMM386 is providing expanded memory to
an application such as your spreadsheet or if there are TSR
software programs or device drivers loaded into upper memory
which EMM386 is managing.
-- HELP -- (External)
This command provides help/reminder screens about DOS command
syntax and use. To obtain a complete list of all DOS commands,
simply type HELP at the DOS prompt. Slightly faster, if you need
help with only a single command is to type HELP /?
If you know the specific DOS command for which you need help,
simply type HELP and the command name. (Example) HELP COPY
HELP syntax is:
HELP [command]
-- HIMEM.SYS -- (External)
This device driver manages extended memory including the HMA
(high memory area) and prevents programs from simultaneously
using the same area of memory. HIMEM.SYS is usually installed
via a statement in your CONFIG.SYS file and should precede in
the CONFIG.SYS file other device drivers which use extended
memory such as EMM386, SMARTDRIVE.SYS or RAMDRIVE.SYS.
-- LOADHIGH -- (External)
Allows the user to load a TSR program such as a calculator or
other "popup" program into the upper memory area of RAM.
LOADHIGH syntax is:
LOADHIGH [d:] [path] filename [parameters]
Parameters:
filename Name of the program to load into high memory
parameters Parameters used by the program loaded
Warning: note that LOADHIGH will, without notice, load a program
into conventional lower memory if there is insufficient upper
memory to accomplish the task. LOADHIGH will not warn you of
this result, but you can use the MEM/C command to determine
where the program was loaded or to verify memory configuration
if in doubt.
-- MEM -- (External)
This DOS 5.0 utility provides a concise listing of memory use.
It provides information on which programs, device drivers and
buffers are in use, memory consumed, free memory and location of
all software. Works with conventional, expanded and extended
memory.
MEM syntax is:
MEM [/CLASSIFY|/DEBUG|PROGRAM]
Parameters:
/CLASSIFY Provide list of programs in conventional and
or /C upper memory
/DEBUG Provide list of programs and device drivers
or /D loaded in memory
/PROGRAM Provide list of programs in memory
or /P
The /C parameter switch is perhaps the most useful for
determining contents of upper memory and may called from a batch
file such as AUTOEXEC.BAT to confirm critical upper memory
usage.
-- MIRROR -- (External)
This unique utility creates a special "tracking" file which
stores the location of files which have been deleted but can be
located and "unerased" with the UNDELETE and UNFORMAT commands.
By keeping a detailed record of deleted files by loading MIRROR,
chances are improved for file recovery in case an unwanted
deletion occurs. It can also backup a copy of the hard disk
partition tables to floppy in case of massive file deletions or
virus infection. MIRROR has three distinct functions.
MIRROR syntax and parameters are:
MIRROR /PARTN Creates a backup copy of hard disk partition
tables.
MIRROR d: [/1] Creates MIRROR disaster recovery file used by
UNFORMAT command
MIRROR /Tdrive[-entries] [...]
The above command places MIRROR in memory
resident mode and provides deletion tracking
in memory which can be used by the UNDELETE
command
MIRROR /U Removes the MIRROR utility from memory
Parameters:
/PARTN Makes backup of disk partition tables
/1 Retains only latest disk information
/Tdrive Provide deletion tracking for drive specified
entries Within a range of 1 to 999, provide deletion
tracking for the specified number of entries
for the specified drive
The value of the MIRROR command lies in frequent use to prevent
data loss due to accidental formatting, virus infection or
other disk problems where sensitive files must be reliably
maintained.
-- QBASIC -- (External)
Entire volumes have been written about Qbasic, also known as
QuickBasic. It is a complete programming language that allows
you to design custom software for jobs which DOS programming cannot
provide. Qbasic provides a way to construct small databases,
printing software, calculators or simple business accounting
software. Qbasic, as delivered with DOS 5.0, is an interpreter
which must be present at all times along with your software
program.
A basic compiler, which is an entirely different programming
package, allows you to build standalone software packages which
do not require a Qbasic interpreter to be present. Qbasic
includes a workable program text editor for easy program
construction. Basic programs use the extension BAS. For example
you might see a file named BASEBALL.BAS which is run by loading
it into the Qbasic interpreter. If you load Qbasic then can't
figure how to get back to DOS, type the command SYSTEM then
hit the return key/press enter.
Qbasic syntax is:
QBASIC [/B] [/EDITOR] [/G] [/H] [/MBF] [/NOHI] [[/RUN][d:]
[path]filename]
Parameters:
/B Starts Qbasic in black and white mode
/EDITOR Starts only the DOS editor
/G Fast screen update on CGA displays
/H Display maximum number of lines
/MBF Change the internal Qbasic functions as follows:
CVD to CVDMBF
CVS to CVSMBF
MKS$ to MKSMBF$
MKD$ to MKDMBF$
/NOHI Suppress colors in high intensity hues
/RUN Run program specified by filename
filename Name of Basic program to run
You can now run a Qbasic program from a batch file, then return
control back to the original batch file. Use the /RUN parameter
switch and make the final statement in the Qbasic program SYSTEM.
-- SETVER -- (External)
This small, but necessary utility is of use when you need to
reset the internal DOS version number - such as DOS 5.0 - to an
earlier version number so that older software which checks this
number will run reliably. SETVER also updates a list of
programs and the required DOS version number each program needs.
If a program refuses to load and run or reports an incorrect DOS
version number, SETVER may be the utility you need. Simply add
the name of the problem software application and required DOS
version number to the SETVER data list. Note that SETVER only
works when it is loaded with a DEVICE or DEVICEHIGH statement
in the CONFIG.SYS file. When you update or change entries in the
SETVER data table, you must restart your computer to update the
changes.
SETVER syntax is:
SETVER [d:path] [filename] [n.nn] [/DELETE] [/QUIET]
Parameters:
d:path Drive and path where SETVER is stored
filename Filename of software program to which a
version number is given
n.nn Version number to report: 2.11, for example
/DELETE Delete an entry from the SETVER data table
/QUIET Remove/suppress messages when /DELETE
is active
-- SHELL -- (External)
This utility is a versatile menu system which lets you move,
copy, delete, view and manage files with a point and click menu
interface. File viewing is available in either ASCII plaintext
or hexadecimal display mode. An onboard task switcher lets you
start a software application, freeze the screen and data, exit
to a different application then later return to your first
application where you left off. New file management capabilities
allow you to search an entire hard drive for a file, alter file
attributes and even associate data files with a parent software
application. Once the data is associated or "linked" to its
parent software application, you can start the program simply by
clicking on the data file - such as a spreadsheet template or
word processing document. The shell display operates in graphics
modes including 43 and 60 line displays. The shell consists of
several operational files and help screens such as SHELLB.COM,
SHELLC.EXE, SHELL.ASC, SHELL.CLR, SHELL.HLP and SHELL.MEU.
-- SMARTDRIVE.SYS -- (External)
This utility creates a disk cache in RAM memory which can speed
up the performance of software applications which frequently
access the hard drive. By using a cache, frequently needed data
is stored in a fast RAM cache memory area rather than waiting on
the more slowly accessed disk. By default, SMARTDRIVE.SYS is
installed to extended memory to conserve conventional memory
space for software applications. Using the /A switch after the
command forces installation to expanded memory. Since
SMARTDRIVE.SYS is a device driver, it must be installed as a
DEVICE statement in your CONFIG.SYS file.
-- UNDELETE -- (External)
Allows accidentally deleted files to be recovered. Since DOS
deletes files by merely removing the filename from a master
index called the allocation table, it is possible to recover the
data if a recovery attempt is made SOON after the file is
deleted to prevent newer files from eventually erasing the older
data. Using the DOS MIRROR program substantially increases the
recovery chance from file deletion disasters.
UNDELETE syntax is:
UNDELETE [[d:][path]filename] [/LIST|/ALL] [/DOS|/DT]
Parameters:
filename Name of file(s) to undelete
/LIST List the file which might be recoverable
/ALL Undelete all files without prompting for
first letter of each filename
/DOS Ignore delete tracking file
/DT Use delete tracking file
A quick shortcut if you need to undelete several files without
halting to supply the first letter of each one is to move to the
directory where the files were stored by using the CHANGE
DIRECTORY or CD command, then enter UNDELETE /ALL. Since you
are in the directory in question, UNDELETE will recover all
files which you can later rename if necessary.
-- UNFORMAT -- (External)
Provides the capability to restore the directory structure of a
floppy or hard disk which has been accidentally formatted with
the FORMAT command or restructured with the RECOVER command.
Also provides capability to rebuild damaged hard disk
partition/allocation tables. Works with local drives - will not
work with drives which are part of a LAN (local area network.)
Use UNFORMAT to display hard disk partition info by typing the
command: UNFORMAT /PARTN /L
UNFORMAT syntax is:
UNFORMAT /PARTN [/L] Restores hard drive partition table
UNFORMAT d: [/U] [/L] [/TEST] [/P]
Above unformats a hard or floppy disk
UNFORMAT d: /J Verifies that a disk contains MIRROR
data file
Parameters:
/PARTN Saves copy of hard disk partition tables
/L Displays partition info for selected
drive. Without the /L switch: list every
file and subdirectory found and ignore
MIRROR data file if existent.
/U Unformat a disk without using MIRROR
data file
/TEST Perform test unformat. Do not actually
unformat.
/P Send report/data to printer port LPT1
/J Verify MIRROR data file
----------------------------------------------------------------
DOS COMMAND FUNCTIONAL INDEX
---------------------------------------------------------------
Curiously, most computer manuals list DOS commands arranged
alphabetically rather than by FUNCTION, in logical groupings.
Next, a brief functional index which is helpful for most
beginners. PC-Learn tutorials do not attempt to present every
DOS command, since some are best reviewed from your primary DOS
manual. However, once you study this index, you will probably be
able to locate the DOS command you need in your DOS manual.
File management commands:
ATTRIB Change or display file attributes
COMP Compare two files
COPY Copy one or several files
DEL Delete one or several files
DIR Display directory listing
ERASE Delete one or several files
FC Compare two files
RENAME (REN) Rename file or files
REPLACE Replace current files
VERIFY Turn on/off write accuracy verification check
XCOPY Copy one or several files
Disk management commands:
ASSIGN Redirect disk access to alternate drive
CHDIR (CD) Change directory, display current directory
CHKDSK Check disk/files for fragmention, optional repair
DISKCOMP Compare floppy diskettes
DISKCOPY Produce identical copy of diskette
JOIN Join a drive to a directory
MKDIR (MD) Make a directory on disk
RMDIR (RD) Remove a directory from disk
SUBST Substitute drive for a directory
TREE Display directory organization of disk
DOS command, help, menu and screen commands:
APPEND Set search path for non executable file
CLS Clear the monitor screen
COMMAND Start the central command processor
DOSKEY Start command line enchancer/macro features
DOSSHELL Start DOS shell/menu features/task switching
EXPAND Expand file(s) from stored/compressed state
HELP Display help for one or more DOS commands
PATH Set search path for executable files
PROMPT Configure the displayed screen prompt
SET Set environment variable
SETVER Set/reset DOS version number
VER Display version of DOS
File disaster/recovery/prevention commands:
BACKUP Backup hard disk files to floppies
MIRROR Backup partition table/create delete tracking file
RECOVER Recover damaged files
RESTORE Restore files backed up with BACKUP
SHARE Start file-sharing utility for LAN networks
UNDELETE Recover accidentally deleted files
UNFORMAT Unformat/recover formatted disk
Batch file commands:
CALL Call/start one batch file from another
ECHO Turn on/off screen echo, display message
EXIT Stop command processor
FOR Run command once for each element of a repetition
GOTO Jump to another line of a batch program
IF Run command if condition stated is satisfied
PAUSE Pause batch program execution until key press
REM Remark/comment in batch program
SHIFT Shift replaceable parameters to left
Text file commands:
EDIT Start full screen editor/mini-word processor
EDLIN Start rudimentary line editor
FIND Locate a search string of characters
MORE Display data one screen at a time
SORT Sort text file data into sequential order
TYPE Display internal contents of file
Disk setup and configuration commands:
FASTOPEN Install cache for rapid disk use
FDISK Configure hard disk partition(s)
FORMAT Prepare disk to receive data
LABEL Modify, label or delete disk volume label
SYS Copy DOS system files to disk
VOL Display disk volume label and serial number
RAM Memory setup and configuration commands:
EMM386 Install 80386 high memory manager
LOADFIX Load program above 64K memory area
LOADHIGH Load program into upper memory area
MEM Display memory use map
Hardware setup, keyboard, printing and configuration commands:
BREAK Turn on/off break testing
CHCP Change code page (foreign keyboard)
CTTY Set console device
DATE Display or set date
GRAFTABL Install graphics characters (foreign keyboard)
GRAPHICS Install graphics screen printing capability
KEYB Install alternate keyboard layout
MODE Configure printer or modem ports, screen
NLSFUNC Install language support capabilities
PRINT Print spooler installation
TIME Display or set time
Writing programs, changing programs:
DEBUG Start machine code debugger/assembler
EXE2BIN Convert EXE format file to COM format file
QBASIC Start Quick Basic interpreter programming
system
Tutorial finished. Have you registered PC-Learn to receive your
bonus disks? Registration is encouraged. Shareware works on the
honor system! Send $25 to Seattle Scientific Photography,
Department PCL5, PO Box 1506, Mercer Island, WA 98040. Latest
version of PC-Learn and two bonus disks shipped promptly!